import request from '@/utils/request'

// 创建项目阶段计划
export function createProjectPlan(data) {
  return request({
    url: '/live/project-plan/create',
    method: 'post',
    data: data
  })
}

// 更新项目阶段计划
export function updateProjectPlan(data) {
  return request({
    url: '/live/project-plan/update',
    method: 'put',
    data: data
  })
}

// 删除项目阶段计划
export function deleteProjectPlan(id) {
  return request({
    url: '/live/project-plan/delete?id=' + id,
    method: 'delete'
  })
}

// 获得项目阶段计划
export function getProjectPlan(id) {
  return request({
    url: '/live/project-plan/get?id=' + id,
    method: 'get'
  })
}

// 获得项目阶段计划分页
export function getProjectPlanPage(query) {
  return request({
    url: '/live/project-plan/page',
    method: 'get',
    params: query
  })
}

// 导出项目阶段计划 Excel
export function exportProjectPlanExcel(query) {
  return request({
    url: '/live/project-plan/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
